package com.netrust.cmsx.utils.string;

import com.netrust.cmsx.utils.decode.Encodes;

public class String2Html extends org.apache.commons.lang3.StringUtils{
	/**
	 * 替换为手机识别的HTML，去掉样式及属性，保留回车。
	 */
	public static String toHtml(String txt){
		if (txt == null){
			return "";
		}
		return replace(replace(Encodes.escapeHtml(txt), "\n", "<br/>"), "\t", "&nbsp; &nbsp; ");
	}
}
